﻿@model IEnumerable<Guline.SupportCMS.Models.Object.Article>
@{
    int i = 0;
    var ncount = Model.Count() - 1;
}
<div class="ipress_slider mbf">
    <div class="slider_a owl-carousel owl-theme">
        @foreach (var news in Model)
        {
            if(i<3)
            {
                if (i == 0)
                {
                    @Html.Raw("<div class='item clearfix'>")
                }
                    <div class="half">
                        <div class="slide_details">
                            <h3><a href="@Url.Action("Detail", "Content", new { ID = news.ID })" title="@news.Title">@news.Title</a></h3>
                        </div>
                        <a href="@Url.Action("Detail", "Content", new { ID = news.ID })" title="@news.Title">
                            <img src="@Url.Content("~/Content/themes/hot360/images/assets/slider1.jpg")" style="@(i>0 ? "max-height:181px":"")" alt="@news.Title"></a>
                    </div>
                <!-- /half -->
                if (i == 2 || i >= ncount)
                {
                    @Html.Raw("</div>")
                }
            }
            else if (i >= 3 && i < 6)
            { 
                  if (i == 3)
                {
                    @Html.Raw("<div class='item clearfix'>")
                }
                    <div class="half">
                        <div class="slide_details">
                            <h3><a href="@Url.Action("Detail", "Content", new { ID = news.ID })" title="@news.Title">@news.Title</a></h3>
                        </div>
                        <a href="@Url.Action("Detail", "Content", new { ID = news.ID })" title="@news.Title">
                            <img src="@Url.Content("~/Content/themes/hot360/images/assets/slider1.jpg")" style="@(i>3 ? "max-height:181px":"")" alt="@news.Title"></a>
                    </div>
                <!-- /half -->
                if (i == 5||i==ncount)
                {
                    @Html.Raw("</div>")
                }
            }
             else if (i >= 6 && i < 9)
            { 
                  if (i == 6)
                {
                    @Html.Raw("<div class='item clearfix'>")
                }
                    <div class="half">
                        <div class="slide_details">
                            <h3><a href="@Url.Action("Detail", "Content", new { ID = news.ID })" title="@news.Title">@news.Title</a></h3>
                        </div>
                        <a href="@Url.Action("Detail", "Content", new { ID = news.ID })" title="@news.Title">
                            <img src="@Url.Content("~/Content/themes/hot360/images/assets/slider1.jpg")" style="@(i>6 ? "max-height:181px":"")" alt="@news.Title"></a>
                    </div>
                <!-- /half -->
                if (i == 8||i==ncount)
                {
                    @Html.Raw("</div>")
                }
            }
             else if (i >= 9 && i < 12)
            { 
                  if (i == 9)
                {
                    @Html.Raw("<div class='item clearfix'>")
                }
                    <div class="half">
                        <div class="slide_details">
                            <h3><a href="@Url.Action("Detail", "Content", new { ID = news.ID })" title="@news.Title">@news.Title</a></h3>
                        </div>
                        <a href="@Url.Action("Detail", "Content", new { ID = news.ID })" title="@news.Title">
                            <img src="@Url.Content("~/Content/themes/hot360/images/assets/slider1.jpg")" style="@(i>9 ? "max-height:181px":"")" alt="@news.Title"></a>
                    </div>
                <!-- /half -->
                if (i ==11||i==ncount)
                {
                    @Html.Raw("</div>")
                }
            }
            <!-- /slide -->
            i++;
        }
    </div>
    <!-- /slider -->
</div>
<!-- /slider ipress -->
